<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>告警信息</title>
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
		<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
		<link rel="stylesheet" type="text/css" href="../../css/api.css" />
		<link rel="stylesheet" type="text/css" href="../../css/common.css" />
		<style>
			body {
				padding-top: 25px;
			}
			span {
				margin: 15px;
			}
		</style>
	</head>
	<body>
		<div class="content" id="app">
			<table width="100%" v-for="todo in todos">
			<tr onclick="openDetail('../xuncha/xuncha_window.html')">
					<td width="50" align="center">
					<span class="renming" style="background-color:#FF0000;color:#FFFFFF" v-if="todo.level=='高级'">高级</span>
					<span class="renming" style="background-color:#A9A9A9;color:#FFFFFF" v-else>中级</span>
					</td>
						<td width="50" class="ywc">
					<p>
						点位 
					</p>
					<p v-text="todo.arname">
						
					</p></td>
					<td  width="50">
					
					<p width="100" style="height: 20px;overflow: hidden">
						发生时间
					</p>
					<p v-text="todo.alarmtime">
						
					</p></td>
				
					<td width="55" align="center"><p>
						状态：
					</p>
					<p v-text="todo.stitas==1?'已解决':'为解决'">
						已解除
					</p></td>
				</tr>				
			</table>
		</div>
	</body>
	<script type="text/javascript" src="../script/jquery-1.11.0.min.js"></script>
	<script type="text/javascript" src="../../script/api.js"></script>
	<script type="text/javascript" src="../../script/common.js"></script>
	<script type="text/javascript" src="../../script/vue.js"></script>
	<script type="text/javascript">
	
		apiready = function() {
			var app = new Vue({
				el : '#app',
				data : {
					todos:[]
				},
				created : function() {
					api.ajax({
						url : BaseServiceUrl+"json/patrol/alarmlist.json",
						method : 'post',
						data : {
							
						}
					}, function(ret, err) {
						for (var i = 0; i < ret.data.length; i++) {
							app.todos.push(ret.data[i]);
						}
					});
				},
				methods : {
					openWin : function() {
						api.openWin({
							name : 'videos/video_window',
							url : 'videos/video_window.html',
							bounces : false,
							vScrollBarEnabled : false,
							animation : {
								type : 'push',
								subType : "from_right",
								duration : "500"
							},
//							pageParam : {
//								deviceSerial :Serial,
//								deviceType :deviceType
//							}
						});
					}
				}
			});
		};
		
		function randomSwitchBtn() {
		
		api.setFrameGroupIndex({
			name : 'group',
			index : 2,
			reload : true // 设置为true
		});
	}
		
	</script>
</html>
